﻿using System.Collections.Generic;

namespace Cms.Domain
{
    public class SystemContextKey
    {
        private IDictionary<string, string> _values;

        public SystemContextKey()
        {
            _values = new Dictionary<string, string>();
        }
        
        public string ID { get; set; }
        
        public IDictionary<string, string> Values
        {
            get { return _values; }
            protected set { _values = value; }
        }
        
        public string GetValue(string localizationCode)
        {
            if (_values.ContainsKey(localizationCode))
                return _values[localizationCode];
            return _values.ContainsKey("en-US") ? _values["en-US"] : string.Empty;
        }
    }
}